<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="${packPath}.entity.${sort.objName}" table="${sort.infoTableName}" >
    <#list metadatas as mt>
	    <#if mt.dataRestrict=="1">
	    <id name="${mt.dataAttr}" type="java.lang.String">
	        <column name="${mt.dataShortName}" length="32" />
	        <generator class="assigned" />
	    </id>
	    <#else>
	    <#if mt.dataType=="6">
	    <property name="${mt.dataAttr}" type="java.util.Date">
	        <column name="${mt.dataShortName}" length="${mt.dataLength}" />
	    </property>
	    <#elseif mt.dataType=="1">
	    <property name="${mt.dataAttr}" type="java.lang.Integer">
	        <column name="${mt.dataShortName}" length="${mt.dataLength}" />
	    </property>
	    <#elseif mt.dataType=="2">
	     <property name="${mt.dataAttr}" type="java.lang.Long">
	        <column name="${mt.dataShortName}" length="${mt.dataLength}" />
	    </property>
	    <#elseif mt.dataType=="3">
	     <property name="${mt.dataAttr}" type="java.lang.Double">
	        <column name="${mt.dataShortName}" length="${mt.dataLength}" />
	    </property>
	    <#else>
	    <property name="${mt.dataAttr}" type="java.lang.String">
	        <column name="${mt.dataShortName}" length="${mt.dataLength}" />
	    </property>
	    </#if>
	    </#if>
    </#list>
    </class>
</hibernate-mapping>

